package com.fable.sp.core.service;

import com.fable.sp.core.domain.WidgetInstance;
import com.fable.sp.core.widget.WidgetRequest;
import com.fable.sp.core.widget.WidgetResponse;

/**
 * .
 *
 * @author stormning on 16/8/31.
 */
public interface WidgetLifeCycle {

    void afterInstanceCreated(WidgetInstance instance, Long containerId);

    void beforeRender(WidgetRequest widgetRequest, WidgetResponse widgetResponse);

    void afterRender(WidgetRequest widgetRequest, WidgetResponse widgetResponse);

    void beforeSavePreference(WidgetInstance instance);

    void afterSavePreference(WidgetInstance instance);
}
